POV-Ray : Newsgroups : povray.general : Missing something basic: Including sky_spheres : Re: Missing something basic: Including sky_spheres Server Time
2 Aug 2024 04:25:44 EDT (-0400)
  Re: Missing something basic: Including sky_spheres  
From: GrimDude
Date: 9 Jan 2005 14:23:46
Message: <41e184c2$1@news.povray.org>
> If you define a macro, you can use the macro's name, with it's parameters) 
> by itself.
> When you #declare an object, you need an object{MyObject} construction.
> When you #declare a sky_sphere, you need to use sky_sphere{MySkySphere}
> Just the name of the object, sky_sphere, texture, pigment, material,... is 
> not enough.
>
> Alain

I am sorry to inform you that this is incorrect.

The following works just fine:
// **************************
#declare Mice = object { sphere { 0,1 } texture { pigment { color rgb 
1 } } }

#declare Cat = sphere { 0,1 texture { pigment { color rgb 1 } } translate 
<5,0,5> }

camera { location <10,10,-5> look_at 0 }

light_source { <10,10,-5> color rgb 1 }

Mice

Cat

//**************************

but in order for this to work:

//*************************

#declare Mice = object { sphere { 0,1 } texture { pigment { color rgb 
1 } } }

#declare Cat = sphere { 0,1 texture { pigment { color rgb 1 } } translate 
<5,0,5> }

#declare Moon = sky_sphere { pigment { gradient z poly_wave 1.05 color_map {
      [0 color rgb .993]
      [1.03 color rgb 1.03] } } }

camera { location <10,10,-5> look_at 0 }

light_source { <10,10,-5> color rgb 1 }

Mice

Cat

Moon

//*******************************

"Moon" must be written as "sky_sphere { Moon }" or an error will occur.

- Grim


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.